{% extends "base.html" %}

{% import "bootstrap/wtf.html" as wtf %}
{% import "bootstrap/fixes.html" as fixes %}
{% import "bootstrap/utils.html" as util %}

{% block title %}About{% endblock %}

{% block scripts %}
    {{ super() }}
    <script type="text/javascript">
        var maxHeight = 0;
        $(".panel-body").find(".row").find(".col-sm-6").find(".thumbnail").each(function (idx, item) {
            var height = $(item).height();
            maxHeight = maxHeight > height ? maxHeight : height;
        });
        $(".panel-body").find(".row").find(".col-sm-6").find(".thumbnail").height(maxHeight);
    </script>
{% endblock %}

{% import "meta/macros.html" as compath %}

{% block content %}
    <div class="container">
        {{ util.flashed_messages(dismissible=True, container=False) }}

        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">About</h3>
            </div>
            <div class="panel-body">
                <p>
                    ComPath is developed and maintained in an academic capacity by <a
                        href="https://github.com/">Lev Rogozhin</a>
                </p>
            </div>
        </div>

        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">Database Version</h3>
            </div>
            <div class="panel-body">
                <p>This table shows the last update in the database plugins.</p>
                <div class="list-group">
                    {% for key, value in db_version.items() %}
                        <div class="list-group-item">
                            <h4 class="list-group-item-heading">{{ compath.stylize_plugin_name(STYLED_NAMES, key) }}
                            </h4>
                            <p class="list-group-item-text">{{ value }}</p>
                        </div>
                    {% endfor %}
                </div>
            </div>
        </div>


        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">References</h3>
            </div>
            <div class="panel-body">
                <div class="col-sm-12 col-md-12 col-lg-12">
                    <h2>Resources</h2>
                    <p>
                        Resources from <a href="http://www.kegg.jp/">KEGG</a>,
                        <a href="https://reactome.org/">Reactome</a>,
                        <a href="https://www.wikipathways.org/">WikiPathways</a>, and
                        <a href="http://software.broadinstitute.org/gsea/msigdb/">MSigDB</a>
                        have been used to build this package and application.
                    </p>
                    <hr>
                    <h3><b>KEGG</b></h3>

                    <h4>License</h4>
                    <p>KEGG gene sets are downloaded via the <a href="http://www.kegg.jp/kegg/rest/">KEGG API</a> for
                        academic purposes (<a
                                href="http://www.kegg.jp/kegg/legal.html">Terms and
                            conditions</a>). More info at <a href="https://github.com/bio2bel/kegg">Bio2BEL KEGG</a>.
                    </p>

                    <h4>References</h4>

                    <ul>
                        <li>Kanehisa, Furumichi, M., Tanabe, M., Sato, Y., and Morishima, K.; KEGG: new
                            perspectives
                            on genomes, pathways, diseases and drugs. Nucleic Acids Res. 45, D353-D361
                            (2017).
                        </li>
                        <li>Kanehisa, M., Sato, Y., Kawashima, M., Furumichi, M., and Tanabe, M.; KEGG as a
                            reference resource for gene and protein annotation. Nucleic Acids Res. 44,
                            D457-D462
                            (2016).
                        </li>
                        <li> Kanehisa, M. and Goto, S.; KEGG: Kyoto Encyclopedia of Genes and Genomes.
                            Nucleic Acids
                            Res. 28, 27-30 (2000).
                        </li>
                    </ul>
                    <hr>

                    <h3><b>Reactome</b></h3>

                    <h4>License</h4>
                    <p>Reactome gene sets are downloaded via the <a href="https://reactome.org/download-data">Reactome
                        API</a> for academic purposes (<a
                            href="https://reactome.org/ContentService/about/license-agreement">Terms and
                        conditions</a>). More info at <a href="https://github.com/bio2bel/reactome">Bio2BEL
                        Reactome</a>.
                    </p>
                    <h4>References</h4>

                    <ul>
                        <li>Fabregat, Antonio et al. “The Reactome Pathway Knowledgebase.” Nucleic Acids
                            Research 44.Database issue (2016): D481–D487. PMC. Web. 6 Oct. 2017.
                        </li>
                        <li>Croft, David et al. “The Reactome Pathway Knowledgebase.” Nucleic Acids Research
                            42.Database issue (2014): D472–D477. PMC. Web. 6 Oct. 2017.
                        </li>
                    </ul>
                    <hr>

                    <h3><b>WikiPathways</b></h3>

                    <h4>License</h4>
                    <p>WikiPathways gene sets are downloaded via the <a>WikiPathways
                        API</a> for academic purposes (<a
                            href="https://www.wikipathways.org/index.php/WikiPathways:License_Terms">Terms and
                        conditions</a>). More info at <a href="https://github.com/bio2bel/wikipathways">Bio2BEL
                        WikiPathways</a>.
                    </p>
                    <h4>References</h4>

                    <ul>
                        <li>Slenter DN, Kutmon M, Hanspers K, Riutta A, Windsor J, Nunes N, Mélius J, Cirillo E,
                            Coort SL, Digles D, Ehrhart F, Giesbertz P, Kalafati M, Martens M, Miller R, Nishida
                            K,
                            Rieswijk L, Waagmeester A, Eijssen LMT, Evelo CT, Pico AR, Willighagen EL.
                            WikiPathways:
                            a multifaceted pathway database bridging metabolomics to other omics research
                            Nucleic
                            Acids Research, (2017)doi.org/10.1093/nar/gkx1064
                        </li>
                        <li>Kutmon M, Riutta A, Nunes N, Hanspers K, Willighagen EL, Bohler A, Mélius J,
                            Waagmeester
                            A, Sinha SR, Miller R, Coort SL, Cirillo E, Smeets B, Evelo CT, Pico AR.
                            WikiPathways:
                            capturing the full diversity of pathway knowledge Nucl. Acids Res., 44, D488-D494
                            (2016)
                            doi:10.1093/nar/gkv1024
                        </li>
                        <li>Kelder T, van Iersel MP, Hanspers K, Kutmon M, Conklin BR, Evelo C, Pico AR.
                            WikiPathways: building research communities on biological pathways. Nucleic Acids
                            Res.
                            2012 Jan;40(Database issue):D1301-7
                        </li>
                    </ul>
                    <hr>
                    <h3><b>MSigDB</b></h3>

                    <h4>License</h4>
                    <p>Only MSig gene sets with <a href="http://creativecommons.org/licenses/by/4.0/">(CC BY 4.0)</a>
                        are used in ComPath (<a
                                href="http://software.broadinstitute.org/gsea/msigdb_license_terms.jsp">Terms and
                            conditions</a>). More info at <a href="https://github.com/bio2bel/msig">Bio2BEL
                            MSig</a>.
                    </p>

                    <h4>References</h4>
                    <ul>
                        <li>Subramanian, A., Tamayo, P., Mootha, V. K., Mukherjee, S., Ebert, B. L., Gillette,
                            M. A., ... & Mesirov, J. P. (2005). Gene set enrichment analysis: a knowledge-based
                            approach for interpreting genome-wide expression profiles. Proceedings of the
                            National Academy of Sciences, 102(43), 15545-15550.
                        </li>
                    </ul>
                    <hr>
                    <h2>Visualization Tools</h2>
                    <p>
                        This application makes use of other dedicated bioinformatics software such as <a
                            href="http://amp.pharm.mssm.edu/clustergrammer/">
                        Clustergrammer</a> and <a href="http://js.cytoscape.org/">
                        Cytoscape JS</a>.
                    </p>

                    <h4>References</h4>

                    <ul>
                        <li>Fernandez, N. F. et al. Clustergrammer, a web-based heatmap visualization and
                            analysis
                            tool for high-dimensional biological data. Sci. Data 4:170151 doi:
                            <a href="https://www.nature.com/articles/sdata2017151">10.1038/sdata.2017.151 </a>(2017).
                        </li>
                        <li>
                            Franz, M., Lopes, C. T., Huck, G., Dong, Y., Sumer, O., & Bader, G. D. (2015).
                            Cytoscape. js: a graph theory library for visualisation and analysis.
                            Bioinformatics, 32(2), 309-311.
                        </li>
                    </ul>

                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">Links and Cards</h3>
            </div>
            <div class="panel-body">


                <div class="col-sm-4 col-md-4 col-lg-4">
                    <div class="thumbnail">
                        <div class="caption">
                            <h3>API</h3>
                            <p>
                                Our RESTful service is documented with the
                                <a href="https://www.openapis.org/">OpenAPI</a> specification. In the future, we
                                will also provide a <a href="http://graphql.org/learn/">GraphQL</a>
                                API using <a href="https://github.com/graphql-python/graphene">graphene</a>.
                            </p>
                            <p>
                                <a href="{{ url_for('flasgger.apidocs') }}" class="btn btn-primary">
                                    Swagger UI
                                </a>
                                <a href="{{ url_for('flasgger.apispec_1') }}" class="btn btn-primary">
                                    OpenAPI Spec
                                </a>
                            </p>
                        </div>
                    </div>
                </div>

                <div class="col-sm-4 col-md-4 col-lg-4">
                    <div class="thumbnail">
                        <div class="caption">
                            <h3>Legal</h3>
                            <p>
                                ComPath is hosted in Germany, and has an imprint dictating disclaimers, etc.
                            </p>
                            <p>
                                <a href="{{ url_for('ui.imprint') }}" class="btn btn-primary">Imprint</a>
                            </p>
                        </div>
                    </div>
                </div>

                <div class="col-sm-4 col-md-4 col-lg-4">
                    <div class="thumbnail">
                        <div class="caption">
                            <h3>Artwork</h3>
                            <p>
                                The ComPath logo is derived from <a
                                    href="http://game-icons.net/delapouite/originals/road.html">Road</a>
                                by <a href="https://lorcblog.blogspot.com/">Lorc</a> and <a
                                    href="http://game-icons.net/delapouite/originals/compact-disc.html">Compact Disc</a>
                                by <a href="http://delapouite.com/">Delapouite</a>, used under <a
                                    href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>. The ComPath
                                logo is licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY
                                3.0</a> by <a href="https://github.com/">Lev Rogozhin</a>.</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">Dependencies</h3>
            </div>
            <div class="panel-body">

                <div class="col-sm-6 col-md-6">
                    <div class="thumbnail">
                        <div class="caption">
                            <h3>Python</h3>
                            <ul>
                                <li><a href="http://flask.pocoo.org/">Flask</a></li>
                                <li><a href="http://click.pocoo.org/">Click</a></li>
                                <li><a href="http://pandas.pydata.org/">Pandas</a></li>
                                <li><a href="https://www.sqlalchemy.org/">SQLAlchemy</a></li>
                            </ul>
                        </div>
                    </div>
                </div>

                <div class="col-sm-6 col-md-6">
                    <div class="thumbnail">
                        <div class="caption">
                            <h3>Javascript</h3>
                            <ul>
                                <li><a href="https://getbootstrap.com/">Bootstrap</a></li>
                                <li><a href="https://jquery.com/">jQuery</a></li>
                                <li><a href="https://datatables.net/">DataTables</a></li>
                                <li><a href="https://d3js.org/">D3.js</a></li>
                                <li><a href="https://github.com/benfred/venn.js">Venn.js</a></li>
                                <li><a href="http://amp.pharm.mssm.edu/clustergrammer/">Clustergrammer</a></li>
                                <li><a href="http://js.cytoscape.org/"> Cytoscape JS</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">Application Metadata</h3>
            </div>
            <div class="list-group">
                {% for key, value in metadata %}
                    <div class="list-group-item">
                        <h4 class="list-group-item-heading">{{ key }}</h4>
                        <p class="list-group-item-text">{{ value }}</p>
                    </div>
                {% endfor %}
            </div>
        </div>
    </div>
{% endblock %}
